//===----------------------------------------------------------------------===//
//
// This source file is part of the Soto for AWS open source project
//
// Copyright (c) 2017-2024 the Soto project authors
// Licensed under Apache License v2.0
//
// See LICENSE.txt for license information
// See CONTRIBUTORS.txt for the list of Soto project authors
//
// SPDX-License-Identifier: Apache-2.0
//
//===----------------------------------------------------------------------===//

// THIS FILE IS AUTOMATICALLY GENERATED by https://github.com/soto-project/soto-codegenerator.
// DO NOT EDIT.

#if canImport(FoundationEssentials)
import FoundationEssentials
#else
import Foundation
#endif
@_exported import SotoCore

/// Service object for interacting with AWS SWF service.
///
/// Amazon Simple Workflow Service The Amazon Simple Workflow Service (Amazon SWF) makes it easy to build applications that use Amazon's cloud to coordinate work across distributed components. In Amazon SWF, a task represents a logical unit of work that is performed by a component of your workflow. Coordinating tasks in a workflow involves managing intertask dependencies, scheduling, and  concurrency in accordance with the logical flow of the application. Amazon SWF gives you full control over implementing tasks and coordinating them without worrying about underlying complexities such as tracking their progress and maintaining their state. This documentation serves as reference only. For a broader overview of the Amazon SWF programming model, see the  Amazon SWF Developer Guide .
public struct SWF: AWSService {
    // MARK: Member variables

    /// Client used for communication with AWS
    public let client: AWSClient
    /// Service configuration
    public let config: AWSServiceConfig

    // MARK: Initialization

    /// Initialize the SWF client
    /// - parameters:
    ///     - client: AWSClient used to process requests
    ///     - region: Region of server you want to communicate with. This will override the partition parameter.
    ///     - partition: AWS partition where service resides, standard (.aws), china (.awscn), government (.awsusgov).
    ///     - endpoint: Custom endpoint URL to use instead of standard AWS servers
    ///     - middleware: Middleware chain used to edit requests before they are sent and responses before they are decoded 
    ///     - timeout: Timeout value for HTTP requests
    ///     - byteBufferAllocator: Allocator for ByteBuffers
    ///     - options: Service options
    public init(
        client: AWSClient,
        region: SotoCore.Region? = nil,
        partition: AWSPartition = .aws,
        endpoint: String? = nil,
        middleware: AWSMiddlewareProtocol? = nil,
        timeout: TimeAmount? = nil,
        byteBufferAllocator: ByteBufferAllocator = ByteBufferAllocator(),
        options: AWSServiceConfig.Options = []
    ) {
        self.client = client
        self.config = AWSServiceConfig(
            region: region,
            partition: region?.partition ?? partition,
            amzTarget: "SimpleWorkflowService",
            serviceName: "SWF",
            serviceIdentifier: "swf",
            serviceProtocol: .json(version: "1.0"),
            apiVersion: "2012-01-25",
            endpoint: endpoint,
            serviceEndpoints: Self.serviceEndpoints,
            variantEndpoints: Self.variantEndpoints,
            errorType: SWFErrorType.self,
            xmlNamespace: "http://swf.amazonaws.com/doc/2012-01-25",
            middleware: middleware,
            timeout: timeout,
            byteBufferAllocator: byteBufferAllocator,
            options: options
        )
    }


    /// custom endpoints for regions
    static var serviceEndpoints: [String: String] {[
        "us-gov-east-1": "swf.us-gov-east-1.amazonaws.com",
        "us-gov-west-1": "swf.us-gov-west-1.amazonaws.com"
    ]}


    /// FIPS and dualstack endpoints
    static var variantEndpoints: [EndpointVariantType: AWSServiceConfig.EndpointVariant] {[
        [.fips]: .init(endpoints: [
            "ca-central-1": "swf-fips.ca-central-1.amazonaws.com",
            "ca-west-1": "swf-fips.ca-west-1.amazonaws.com",
            "us-east-1": "swf-fips.us-east-1.amazonaws.com",
            "us-east-2": "swf-fips.us-east-2.amazonaws.com",
            "us-gov-east-1": "swf.us-gov-east-1.amazonaws.com",
            "us-gov-west-1": "swf.us-gov-west-1.amazonaws.com",
            "us-iso-east-1": "swf-fips.us-iso-east-1.c2s.ic.gov",
            "us-iso-west-1": "swf-fips.us-iso-west-1.c2s.ic.gov",
            "us-isob-east-1": "swf-fips.us-isob-east-1.sc2s.sgov.gov",
            "us-west-1": "swf-fips.us-west-1.amazonaws.com",
            "us-west-2": "swf-fips.us-west-2.amazonaws.com"
        ])
    ]}

    // MARK: API Calls

    /// Returns the number of closed workflow executions within the given domain that meet the specified filtering criteria.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    tagFilter.tag: String constraint. The key is swf:tagFilter.tag.    typeFilter.name: String constraint. The key is swf:typeFilter.name.    typeFilter.version: String constraint. The key is swf:typeFilter.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func countClosedWorkflowExecutions(_ input: CountClosedWorkflowExecutionsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> WorkflowExecutionCount {
        try await self.client.execute(
            operation: "CountClosedWorkflowExecutions", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the number of closed workflow executions within the given domain that meet the specified filtering criteria.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    tagFilter.tag: String constraint. The key is swf:tagFilter.tag.    typeFilter.name: String constraint. The key is swf:typeFilter.name.    typeFilter.version: String constraint. The key is swf:typeFilter.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - closeStatusFilter: If specified, only workflow executions that match this close status are counted. This filter has an affect only if executionStatus is specified as CLOSED.   closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - closeTimeFilter: If specified, only workflow executions that meet the close time criteria of the filter are counted.   startTimeFilter and closeTimeFilter are mutually exclusive. You must specify one of these in a request but not both.
    ///   - domain: The name of the domain containing the workflow executions to count.
    ///   - executionFilter: If specified, only workflow executions matching the WorkflowId in the filter are counted.   closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - startTimeFilter: If specified, only workflow executions that meet the start time criteria of the filter are counted.   startTimeFilter and closeTimeFilter are mutually exclusive. You must specify one of these in a request but not both.
    ///   - tagFilter: If specified, only executions that have a tag that matches the filter are counted.   closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - typeFilter: If specified, indicates the type of the workflow executions to be counted.   closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - logger: Logger use during operation
    @inlinable
    public func countClosedWorkflowExecutions(
        closeStatusFilter: CloseStatusFilter? = nil,
        closeTimeFilter: ExecutionTimeFilter? = nil,
        domain: String,
        executionFilter: WorkflowExecutionFilter? = nil,
        startTimeFilter: ExecutionTimeFilter? = nil,
        tagFilter: TagFilter? = nil,
        typeFilter: WorkflowTypeFilter? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> WorkflowExecutionCount {
        let input = CountClosedWorkflowExecutionsInput(
            closeStatusFilter: closeStatusFilter, 
            closeTimeFilter: closeTimeFilter, 
            domain: domain, 
            executionFilter: executionFilter, 
            startTimeFilter: startTimeFilter, 
            tagFilter: tagFilter, 
            typeFilter: typeFilter
        )
        return try await self.countClosedWorkflowExecutions(input, logger: logger)
    }

    /// Returns the number of open workflow executions within the given domain that meet the specified filtering criteria.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    tagFilter.tag: String constraint. The key is swf:tagFilter.tag.    typeFilter.name: String constraint. The key is swf:typeFilter.name.    typeFilter.version: String constraint. The key is swf:typeFilter.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func countOpenWorkflowExecutions(_ input: CountOpenWorkflowExecutionsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> WorkflowExecutionCount {
        try await self.client.execute(
            operation: "CountOpenWorkflowExecutions", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the number of open workflow executions within the given domain that meet the specified filtering criteria.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    tagFilter.tag: String constraint. The key is swf:tagFilter.tag.    typeFilter.name: String constraint. The key is swf:typeFilter.name.    typeFilter.version: String constraint. The key is swf:typeFilter.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - domain: The name of the domain containing the workflow executions to count.
    ///   - executionFilter: If specified, only workflow executions matching the WorkflowId in the filter are counted.   executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - startTimeFilter: Specifies the start time criteria that workflow executions must meet in order to be counted.
    ///   - tagFilter: If specified, only executions that have a tag that matches the filter are counted.   executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - typeFilter: Specifies the type of the workflow executions to be counted.   executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - logger: Logger use during operation
    @inlinable
    public func countOpenWorkflowExecutions(
        domain: String,
        executionFilter: WorkflowExecutionFilter? = nil,
        startTimeFilter: ExecutionTimeFilter,
        tagFilter: TagFilter? = nil,
        typeFilter: WorkflowTypeFilter? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> WorkflowExecutionCount {
        let input = CountOpenWorkflowExecutionsInput(
            domain: domain, 
            executionFilter: executionFilter, 
            startTimeFilter: startTimeFilter, 
            tagFilter: tagFilter, 
            typeFilter: typeFilter
        )
        return try await self.countOpenWorkflowExecutions(input, logger: logger)
    }

    /// Returns the estimated number of activity tasks in the specified task list. The count returned is an approximation and isn't guaranteed to be exact. If you specify a task list that no activity task was ever scheduled in then 0 is returned.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the taskList.name parameter by using a Condition element with the swf:taskList.name key to allow the action to access only certain task lists.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func countPendingActivityTasks(_ input: CountPendingActivityTasksInput, logger: Logger = AWSClient.loggingDisabled) async throws -> PendingTaskCount {
        try await self.client.execute(
            operation: "CountPendingActivityTasks", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the estimated number of activity tasks in the specified task list. The count returned is an approximation and isn't guaranteed to be exact. If you specify a task list that no activity task was ever scheduled in then 0 is returned.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the taskList.name parameter by using a Condition element with the swf:taskList.name key to allow the action to access only certain task lists.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - domain: The name of the domain that contains the task list.
    ///   - taskList: The name of the task list.
    ///   - logger: Logger use during operation
    @inlinable
    public func countPendingActivityTasks(
        domain: String,
        taskList: TaskList,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PendingTaskCount {
        let input = CountPendingActivityTasksInput(
            domain: domain, 
            taskList: taskList
        )
        return try await self.countPendingActivityTasks(input, logger: logger)
    }

    /// Returns the estimated number of decision tasks in the specified task list. The count returned is an approximation and isn't guaranteed to be exact. If you specify a task list that no decision task was ever scheduled in then 0 is returned.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the taskList.name parameter by using a Condition element with the swf:taskList.name key to allow the action to access only certain task lists.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func countPendingDecisionTasks(_ input: CountPendingDecisionTasksInput, logger: Logger = AWSClient.loggingDisabled) async throws -> PendingTaskCount {
        try await self.client.execute(
            operation: "CountPendingDecisionTasks", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the estimated number of decision tasks in the specified task list. The count returned is an approximation and isn't guaranteed to be exact. If you specify a task list that no decision task was ever scheduled in then 0 is returned.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the taskList.name parameter by using a Condition element with the swf:taskList.name key to allow the action to access only certain task lists.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - domain: The name of the domain that contains the task list.
    ///   - taskList: The name of the task list.
    ///   - logger: Logger use during operation
    @inlinable
    public func countPendingDecisionTasks(
        domain: String,
        taskList: TaskList,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> PendingTaskCount {
        let input = CountPendingDecisionTasksInput(
            domain: domain, 
            taskList: taskList
        )
        return try await self.countPendingDecisionTasks(input, logger: logger)
    }

    /// Deletes the specified activity type. Note: Prior to deletion, activity types must first be deprecated.   After an activity type has been deleted, you cannot schedule new activities of that type. Activities that started before the type was deleted will continue to run.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    activityType.name: String constraint. The key is swf:activityType.name.    activityType.version: String constraint. The key is swf:activityType.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func deleteActivityType(_ input: DeleteActivityTypeInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteActivityType", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the specified activity type. Note: Prior to deletion, activity types must first be deprecated.   After an activity type has been deleted, you cannot schedule new activities of that type. Activities that started before the type was deleted will continue to run.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    activityType.name: String constraint. The key is swf:activityType.name.    activityType.version: String constraint. The key is swf:activityType.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - activityType: The activity type to delete.
    ///   - domain: The name of the domain in which the activity type is registered.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteActivityType(
        activityType: ActivityType,
        domain: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteActivityTypeInput(
            activityType: activityType, 
            domain: domain
        )
        return try await self.deleteActivityType(input, logger: logger)
    }

    /// Deletes the specified workflow type. Note: Prior to deletion, workflow types must first be deprecated.  After a workflow type has been deleted, you cannot create new executions of that type. Executions that started before the type was deleted will continue to run.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    workflowType.name: String constraint. The key is swf:workflowType.name.    workflowType.version: String constraint. The key is swf:workflowType.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func deleteWorkflowType(_ input: DeleteWorkflowTypeInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeleteWorkflowType", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deletes the specified workflow type. Note: Prior to deletion, workflow types must first be deprecated.  After a workflow type has been deleted, you cannot create new executions of that type. Executions that started before the type was deleted will continue to run.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    workflowType.name: String constraint. The key is swf:workflowType.name.    workflowType.version: String constraint. The key is swf:workflowType.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - domain: The name of the domain in which the workflow type is registered.
    ///   - workflowType: The workflow type to delete.
    ///   - logger: Logger use during operation
    @inlinable
    public func deleteWorkflowType(
        domain: String,
        workflowType: WorkflowType,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeleteWorkflowTypeInput(
            domain: domain, 
            workflowType: workflowType
        )
        return try await self.deleteWorkflowType(input, logger: logger)
    }

    /// Deprecates the specified activity type. After an activity type has been deprecated, you cannot create new tasks of that activity type. Tasks of this type that were scheduled before the type was deprecated continue to run.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    activityType.name: String constraint. The key is swf:activityType.name.    activityType.version: String constraint. The key is swf:activityType.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func deprecateActivityType(_ input: DeprecateActivityTypeInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeprecateActivityType", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deprecates the specified activity type. After an activity type has been deprecated, you cannot create new tasks of that activity type. Tasks of this type that were scheduled before the type was deprecated continue to run.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    activityType.name: String constraint. The key is swf:activityType.name.    activityType.version: String constraint. The key is swf:activityType.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - activityType: The activity type to deprecate.
    ///   - domain: The name of the domain in which the activity type is registered.
    ///   - logger: Logger use during operation
    @inlinable
    public func deprecateActivityType(
        activityType: ActivityType,
        domain: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeprecateActivityTypeInput(
            activityType: activityType, 
            domain: domain
        )
        return try await self.deprecateActivityType(input, logger: logger)
    }

    /// Deprecates the specified domain. After a domain has been deprecated it cannot be used to create new workflow executions or register new types. However, you can still use visibility actions on this domain. Deprecating a domain also deprecates all activity and workflow types registered in the domain. Executions that were started before the domain was deprecated continues to run.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func deprecateDomain(_ input: DeprecateDomainInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeprecateDomain", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deprecates the specified domain. After a domain has been deprecated it cannot be used to create new workflow executions or register new types. However, you can still use visibility actions on this domain. Deprecating a domain also deprecates all activity and workflow types registered in the domain. Executions that were started before the domain was deprecated continues to run.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - name: The name of the domain to deprecate.
    ///   - logger: Logger use during operation
    @inlinable
    public func deprecateDomain(
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeprecateDomainInput(
            name: name
        )
        return try await self.deprecateDomain(input, logger: logger)
    }

    /// Deprecates the specified workflow type. After a workflow type has been deprecated, you cannot create new executions of that type. Executions that were started before the type was deprecated continues to run. A deprecated workflow type may still be used when calling visibility actions.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    workflowType.name: String constraint. The key is swf:workflowType.name.    workflowType.version: String constraint. The key is swf:workflowType.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func deprecateWorkflowType(_ input: DeprecateWorkflowTypeInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "DeprecateWorkflowType", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Deprecates the specified workflow type. After a workflow type has been deprecated, you cannot create new executions of that type. Executions that were started before the type was deprecated continues to run. A deprecated workflow type may still be used when calling visibility actions.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    workflowType.name: String constraint. The key is swf:workflowType.name.    workflowType.version: String constraint. The key is swf:workflowType.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - domain: The name of the domain in which the workflow type is registered.
    ///   - workflowType: The workflow type to deprecate.
    ///   - logger: Logger use during operation
    @inlinable
    public func deprecateWorkflowType(
        domain: String,
        workflowType: WorkflowType,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = DeprecateWorkflowTypeInput(
            domain: domain, 
            workflowType: workflowType
        )
        return try await self.deprecateWorkflowType(input, logger: logger)
    }

    /// Returns information about the specified activity type. This includes configuration settings provided when the type was registered and other general information about the type.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    activityType.name: String constraint. The key is swf:activityType.name.    activityType.version: String constraint. The key is swf:activityType.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func describeActivityType(_ input: DescribeActivityTypeInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ActivityTypeDetail {
        try await self.client.execute(
            operation: "DescribeActivityType", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns information about the specified activity type. This includes configuration settings provided when the type was registered and other general information about the type.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    activityType.name: String constraint. The key is swf:activityType.name.    activityType.version: String constraint. The key is swf:activityType.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - activityType: The activity type to get information about. Activity types are identified by the name and version that were supplied when the activity was registered.
    ///   - domain: The name of the domain in which the activity type is registered.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeActivityType(
        activityType: ActivityType,
        domain: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ActivityTypeDetail {
        let input = DescribeActivityTypeInput(
            activityType: activityType, 
            domain: domain
        )
        return try await self.describeActivityType(input, logger: logger)
    }

    /// Returns information about the specified domain, including description and status.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func describeDomain(_ input: DescribeDomainInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DomainDetail {
        try await self.client.execute(
            operation: "DescribeDomain", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns information about the specified domain, including description and status.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - name: The name of the domain to describe.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeDomain(
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DomainDetail {
        let input = DescribeDomainInput(
            name: name
        )
        return try await self.describeDomain(input, logger: logger)
    }

    /// Returns information about the specified workflow execution including its type and some statistics.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func describeWorkflowExecution(_ input: DescribeWorkflowExecutionInput, logger: Logger = AWSClient.loggingDisabled) async throws -> WorkflowExecutionDetail {
        try await self.client.execute(
            operation: "DescribeWorkflowExecution", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns information about the specified workflow execution including its type and some statistics.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - domain: The name of the domain containing the workflow execution.
    ///   - execution: The workflow execution to describe.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeWorkflowExecution(
        domain: String,
        execution: WorkflowExecution,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> WorkflowExecutionDetail {
        let input = DescribeWorkflowExecutionInput(
            domain: domain, 
            execution: execution
        )
        return try await self.describeWorkflowExecution(input, logger: logger)
    }

    /// Returns information about the specified workflow type. This includes configuration settings specified when the type was registered and other information such as creation date, current status, etc.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    workflowType.name: String constraint. The key is swf:workflowType.name.    workflowType.version: String constraint. The key is swf:workflowType.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func describeWorkflowType(_ input: DescribeWorkflowTypeInput, logger: Logger = AWSClient.loggingDisabled) async throws -> WorkflowTypeDetail {
        try await self.client.execute(
            operation: "DescribeWorkflowType", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns information about the specified workflow type. This includes configuration settings specified when the type was registered and other information such as creation date, current status, etc.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    workflowType.name: String constraint. The key is swf:workflowType.name.    workflowType.version: String constraint. The key is swf:workflowType.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - domain: The name of the domain in which this workflow type is registered.
    ///   - workflowType: The workflow type to describe.
    ///   - logger: Logger use during operation
    @inlinable
    public func describeWorkflowType(
        domain: String,
        workflowType: WorkflowType,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> WorkflowTypeDetail {
        let input = DescribeWorkflowTypeInput(
            domain: domain, 
            workflowType: workflowType
        )
        return try await self.describeWorkflowType(input, logger: logger)
    }

    /// Returns the history of the specified workflow execution. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by the initial call.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func getWorkflowExecutionHistory(_ input: GetWorkflowExecutionHistoryInput, logger: Logger = AWSClient.loggingDisabled) async throws -> History {
        try await self.client.execute(
            operation: "GetWorkflowExecutionHistory", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the history of the specified workflow execution. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by the initial call.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - domain: The name of the domain containing the workflow execution.
    ///   - execution: Specifies the workflow execution for which to return the history.
    ///   - maximumPageSize: The maximum number of results that are returned per call. Use nextPageToken to obtain further pages of results.
    ///   - nextPageToken: If NextPageToken is returned there are more results available.  The value of NextPageToken is a unique pagination token for each page. Make the call again using  the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires  after 24 hours. Using an expired pagination token will return a 400 error: "Specified token has  exceeded its maximum lifetime".  The configured maximumPageSize determines how many results can be returned in a single call.
    ///   - reverseOrder: When set to true, returns the events in reverse order. By default the results are returned in ascending order of the eventTimeStamp of the events.
    ///   - logger: Logger use during operation
    @inlinable
    public func getWorkflowExecutionHistory(
        domain: String,
        execution: WorkflowExecution,
        maximumPageSize: Int? = nil,
        nextPageToken: String? = nil,
        reverseOrder: Bool? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> History {
        let input = GetWorkflowExecutionHistoryInput(
            domain: domain, 
            execution: execution, 
            maximumPageSize: maximumPageSize, 
            nextPageToken: nextPageToken, 
            reverseOrder: reverseOrder
        )
        return try await self.getWorkflowExecutionHistory(input, logger: logger)
    }

    /// Returns information about all activities registered in the specified domain that match the specified name and registration status. The result includes information like creation date, current status of the activity, etc. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by the initial call.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func listActivityTypes(_ input: ListActivityTypesInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ActivityTypeInfos {
        try await self.client.execute(
            operation: "ListActivityTypes", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns information about all activities registered in the specified domain that match the specified name and registration status. The result includes information like creation date, current status of the activity, etc. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by the initial call.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - domain: The name of the domain in which the activity types have been registered.
    ///   - maximumPageSize: The maximum number of results that are returned per call. Use nextPageToken to obtain further pages of results.
    ///   - name: If specified, only lists the activity types that have this name.
    ///   - nextPageToken: If NextPageToken is returned there are more results available.  The value of NextPageToken is a unique pagination token for each page. Make the call again using  the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires  after 24 hours. Using an expired pagination token will return a 400 error: "Specified token has  exceeded its maximum lifetime".  The configured maximumPageSize determines how many results can be returned in a single call.
    ///   - registrationStatus: Specifies the registration status of the activity types to list.
    ///   - reverseOrder: When set to true, returns the results in reverse order. By default, the results are returned in ascending alphabetical order by name of the activity types.
    ///   - logger: Logger use during operation
    @inlinable
    public func listActivityTypes(
        domain: String,
        maximumPageSize: Int? = nil,
        name: String? = nil,
        nextPageToken: String? = nil,
        registrationStatus: RegistrationStatus,
        reverseOrder: Bool? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ActivityTypeInfos {
        let input = ListActivityTypesInput(
            domain: domain, 
            maximumPageSize: maximumPageSize, 
            name: name, 
            nextPageToken: nextPageToken, 
            registrationStatus: registrationStatus, 
            reverseOrder: reverseOrder
        )
        return try await self.listActivityTypes(input, logger: logger)
    }

    /// Returns a list of closed workflow executions in the specified domain that meet the filtering criteria. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by the initial call.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    tagFilter.tag: String constraint. The key is swf:tagFilter.tag.    typeFilter.name: String constraint. The key is swf:typeFilter.name.    typeFilter.version: String constraint. The key is swf:typeFilter.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func listClosedWorkflowExecutions(_ input: ListClosedWorkflowExecutionsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> WorkflowExecutionInfos {
        try await self.client.execute(
            operation: "ListClosedWorkflowExecutions", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of closed workflow executions in the specified domain that meet the filtering criteria. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by the initial call.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    tagFilter.tag: String constraint. The key is swf:tagFilter.tag.    typeFilter.name: String constraint. The key is swf:typeFilter.name.    typeFilter.version: String constraint. The key is swf:typeFilter.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - closeStatusFilter: If specified, only workflow executions that match this close status are listed. For example, if TERMINATED is specified, then only TERMINATED workflow executions are listed.   closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - closeTimeFilter: If specified, the workflow executions are included in the returned results based on whether their close times are within the range specified by this filter. Also, if this parameter is specified, the returned results are ordered by their close times.   startTimeFilter and closeTimeFilter are mutually exclusive. You must specify one of these in a request but not both.
    ///   - domain: The name of the domain that contains the workflow executions to list.
    ///   - executionFilter: If specified, only workflow executions matching the workflow ID specified in the filter are returned.   closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - maximumPageSize: The maximum number of results that are returned per call. Use nextPageToken to obtain further pages of results.
    ///   - nextPageToken: If NextPageToken is returned there are more results available.  The value of NextPageToken is a unique pagination token for each page. Make the call again using  the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires  after 24 hours. Using an expired pagination token will return a 400 error: "Specified token has  exceeded its maximum lifetime".  The configured maximumPageSize determines how many results can be returned in a single call.
    ///   - reverseOrder: When set to true, returns the results in reverse order. By default the results are returned in descending order of the start or the close time of the executions.
    ///   - startTimeFilter: If specified, the workflow executions are included in the returned results based on whether their start times are within the range specified by this filter. Also, if this parameter is specified, the returned results are ordered by their start times.   startTimeFilter and closeTimeFilter are mutually exclusive. You must specify one of these in a request but not both.
    ///   - tagFilter: If specified, only executions that have the matching tag are listed.   closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - typeFilter: If specified, only executions of the type specified in the filter are returned.   closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - logger: Logger use during operation
    @inlinable
    public func listClosedWorkflowExecutions(
        closeStatusFilter: CloseStatusFilter? = nil,
        closeTimeFilter: ExecutionTimeFilter? = nil,
        domain: String,
        executionFilter: WorkflowExecutionFilter? = nil,
        maximumPageSize: Int? = nil,
        nextPageToken: String? = nil,
        reverseOrder: Bool? = nil,
        startTimeFilter: ExecutionTimeFilter? = nil,
        tagFilter: TagFilter? = nil,
        typeFilter: WorkflowTypeFilter? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> WorkflowExecutionInfos {
        let input = ListClosedWorkflowExecutionsInput(
            closeStatusFilter: closeStatusFilter, 
            closeTimeFilter: closeTimeFilter, 
            domain: domain, 
            executionFilter: executionFilter, 
            maximumPageSize: maximumPageSize, 
            nextPageToken: nextPageToken, 
            reverseOrder: reverseOrder, 
            startTimeFilter: startTimeFilter, 
            tagFilter: tagFilter, 
            typeFilter: typeFilter
        )
        return try await self.listClosedWorkflowExecutions(input, logger: logger)
    }

    /// Returns the list of domains registered in the account. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by the initial call.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains. The element must be set to arn:aws:swf::AccountID:domain/*, where AccountID is the account ID, with no dashes.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func listDomains(_ input: ListDomainsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DomainInfos {
        try await self.client.execute(
            operation: "ListDomains", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns the list of domains registered in the account. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by the initial call.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains. The element must be set to arn:aws:swf::AccountID:domain/*, where AccountID is the account ID, with no dashes.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - maximumPageSize: The maximum number of results that are returned per call. Use nextPageToken to obtain further pages of results.
    ///   - nextPageToken: If NextPageToken is returned there are more results available.  The value of NextPageToken is a unique pagination token for each page. Make the call again using  the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires  after 24 hours. Using an expired pagination token will return a 400 error: "Specified token has  exceeded its maximum lifetime".  The configured maximumPageSize determines how many results can be returned in a single call.
    ///   - registrationStatus: Specifies the registration status of the domains to list.
    ///   - reverseOrder: When set to true, returns the results in reverse order. By default, the results are returned in ascending alphabetical order by name of the domains.
    ///   - logger: Logger use during operation
    @inlinable
    public func listDomains(
        maximumPageSize: Int? = nil,
        nextPageToken: String? = nil,
        registrationStatus: RegistrationStatus,
        reverseOrder: Bool? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DomainInfos {
        let input = ListDomainsInput(
            maximumPageSize: maximumPageSize, 
            nextPageToken: nextPageToken, 
            registrationStatus: registrationStatus, 
            reverseOrder: reverseOrder
        )
        return try await self.listDomains(input, logger: logger)
    }

    /// Returns a list of open workflow executions in the specified domain that meet the filtering criteria. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by the initial call.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    tagFilter.tag: String constraint. The key is swf:tagFilter.tag.    typeFilter.name: String constraint. The key is swf:typeFilter.name.    typeFilter.version: String constraint. The key is swf:typeFilter.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func listOpenWorkflowExecutions(_ input: ListOpenWorkflowExecutionsInput, logger: Logger = AWSClient.loggingDisabled) async throws -> WorkflowExecutionInfos {
        try await self.client.execute(
            operation: "ListOpenWorkflowExecutions", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns a list of open workflow executions in the specified domain that meet the filtering criteria. The results may be split into multiple pages. To retrieve subsequent pages, make the call again using the nextPageToken returned by the initial call.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    tagFilter.tag: String constraint. The key is swf:tagFilter.tag.    typeFilter.name: String constraint. The key is swf:typeFilter.name.    typeFilter.version: String constraint. The key is swf:typeFilter.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - domain: The name of the domain that contains the workflow executions to list.
    ///   - executionFilter: If specified, only workflow executions matching the workflow ID specified in the filter are returned.   executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - maximumPageSize: The maximum number of results that are returned per call. Use nextPageToken to obtain further pages of results.
    ///   - nextPageToken: If NextPageToken is returned there are more results available.  The value of NextPageToken is a unique pagination token for each page. Make the call again using  the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires  after 24 hours. Using an expired pagination token will return a 400 error: "Specified token has  exceeded its maximum lifetime".  The configured maximumPageSize determines how many results can be returned in a single call.
    ///   - reverseOrder: When set to true, returns the results in reverse order. By default the results are returned in descending order of the start time of the executions.
    ///   - startTimeFilter: Workflow executions are included in the returned results based on whether their start times are within the range specified by this filter.
    ///   - tagFilter: If specified, only executions that have the matching tag are listed.   executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - typeFilter: If specified, only executions of the type specified in the filter are returned.   executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - logger: Logger use during operation
    @inlinable
    public func listOpenWorkflowExecutions(
        domain: String,
        executionFilter: WorkflowExecutionFilter? = nil,
        maximumPageSize: Int? = nil,
        nextPageToken: String? = nil,
        reverseOrder: Bool? = nil,
        startTimeFilter: ExecutionTimeFilter,
        tagFilter: TagFilter? = nil,
        typeFilter: WorkflowTypeFilter? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> WorkflowExecutionInfos {
        let input = ListOpenWorkflowExecutionsInput(
            domain: domain, 
            executionFilter: executionFilter, 
            maximumPageSize: maximumPageSize, 
            nextPageToken: nextPageToken, 
            reverseOrder: reverseOrder, 
            startTimeFilter: startTimeFilter, 
            tagFilter: tagFilter, 
            typeFilter: typeFilter
        )
        return try await self.listOpenWorkflowExecutions(input, logger: logger)
    }

    /// List tags for a given domain.
    @Sendable
    @inlinable
    public func listTagsForResource(_ input: ListTagsForResourceInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ListTagsForResourceOutput {
        try await self.client.execute(
            operation: "ListTagsForResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// List tags for a given domain.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) for the Amazon SWF domain.
    ///   - logger: Logger use during operation
    @inlinable
    public func listTagsForResource(
        resourceArn: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ListTagsForResourceOutput {
        let input = ListTagsForResourceInput(
            resourceArn: resourceArn
        )
        return try await self.listTagsForResource(input, logger: logger)
    }

    /// Returns information about workflow types in the specified domain. The results may be split into multiple pages that can be retrieved by making the call repeatedly.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func listWorkflowTypes(_ input: ListWorkflowTypesInput, logger: Logger = AWSClient.loggingDisabled) async throws -> WorkflowTypeInfos {
        try await self.client.execute(
            operation: "ListWorkflowTypes", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Returns information about workflow types in the specified domain. The results may be split into multiple pages that can be retrieved by making the call repeatedly.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - domain: The name of the domain in which the workflow types have been registered.
    ///   - maximumPageSize: The maximum number of results that are returned per call. Use nextPageToken to obtain further pages of results.
    ///   - name: If specified, lists the workflow type with this name.
    ///   - nextPageToken: If NextPageToken is returned there are more results available.  The value of NextPageToken is a unique pagination token for each page. Make the call again using  the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires  after 24 hours. Using an expired pagination token will return a 400 error: "Specified token has  exceeded its maximum lifetime".  The configured maximumPageSize determines how many results can be returned in a single call.
    ///   - registrationStatus: Specifies the registration status of the workflow types to list.
    ///   - reverseOrder: When set to true, returns the results in reverse order. By default the results are returned in ascending alphabetical order of the name of the workflow types.
    ///   - logger: Logger use during operation
    @inlinable
    public func listWorkflowTypes(
        domain: String,
        maximumPageSize: Int? = nil,
        name: String? = nil,
        nextPageToken: String? = nil,
        registrationStatus: RegistrationStatus,
        reverseOrder: Bool? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> WorkflowTypeInfos {
        let input = ListWorkflowTypesInput(
            domain: domain, 
            maximumPageSize: maximumPageSize, 
            name: name, 
            nextPageToken: nextPageToken, 
            registrationStatus: registrationStatus, 
            reverseOrder: reverseOrder
        )
        return try await self.listWorkflowTypes(input, logger: logger)
    }

    /// Used by workers to get an ActivityTask from the specified activity taskList. This initiates a long poll, where the service holds the HTTP connection open and responds as soon as a task becomes available. The maximum time the service holds on to the request before responding is 60 seconds. If no task is available within 60 seconds, the poll returns an empty result. An empty result, in this context, means that an ActivityTask is returned, but that the value of taskToken is an empty string. If a task is returned, the worker should use its type to identify and process it correctly.  Workers should set their client side socket timeout to at least 70 seconds (10 seconds higher than the maximum time service may hold the poll request).   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the taskList.name parameter by using a Condition element with the swf:taskList.name key to allow the action to access only certain task lists.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func pollForActivityTask(_ input: PollForActivityTaskInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ActivityTask {
        try await self.client.execute(
            operation: "PollForActivityTask", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Used by workers to get an ActivityTask from the specified activity taskList. This initiates a long poll, where the service holds the HTTP connection open and responds as soon as a task becomes available. The maximum time the service holds on to the request before responding is 60 seconds. If no task is available within 60 seconds, the poll returns an empty result. An empty result, in this context, means that an ActivityTask is returned, but that the value of taskToken is an empty string. If a task is returned, the worker should use its type to identify and process it correctly.  Workers should set their client side socket timeout to at least 70 seconds (10 seconds higher than the maximum time service may hold the poll request).   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the taskList.name parameter by using a Condition element with the swf:taskList.name key to allow the action to access only certain task lists.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - domain: The name of the domain that contains the task lists being polled.
    ///   - identity: Identity of the worker making the request, recorded in the ActivityTaskStarted event in the workflow history. This enables diagnostic tracing when problems arise. The form of this identity is user defined.
    ///   - taskList: Specifies the task list to poll for activity tasks. The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f-\u009f). Also, it must not be the literal string arn.
    ///   - logger: Logger use during operation
    @inlinable
    public func pollForActivityTask(
        domain: String,
        identity: String? = nil,
        taskList: TaskList,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ActivityTask {
        let input = PollForActivityTaskInput(
            domain: domain, 
            identity: identity, 
            taskList: taskList
        )
        return try await self.pollForActivityTask(input, logger: logger)
    }

    /// Used by deciders to get a DecisionTask from the specified decision taskList. A decision task may be returned for any open workflow execution that is using the specified task list. The task includes a paginated view of the history of the workflow execution. The decider should use the workflow type and the history to determine how to properly handle the task. This action initiates a long poll, where the service holds the HTTP connection open and responds as soon a task becomes available. If no decision task is available in the specified task list before the timeout of 60 seconds expires, an empty result is returned. An empty result, in this context, means that a DecisionTask is returned, but that the value of taskToken is an empty string.  Deciders should set their client side socket timeout to at least 70 seconds (10 seconds higher than the timeout).   Because the number of workflow history events for a single workflow execution might be very large, the result returned might be split up across a number of pages. To retrieve subsequent pages, make additional calls to PollForDecisionTask using the nextPageToken returned by the initial call. Note that you do not call GetWorkflowExecutionHistory with this nextPageToken. Instead, call PollForDecisionTask again.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the taskList.name parameter by using a Condition element with the swf:taskList.name key to allow the action to access only certain task lists.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func pollForDecisionTask(_ input: PollForDecisionTaskInput, logger: Logger = AWSClient.loggingDisabled) async throws -> DecisionTask {
        try await self.client.execute(
            operation: "PollForDecisionTask", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Used by deciders to get a DecisionTask from the specified decision taskList. A decision task may be returned for any open workflow execution that is using the specified task list. The task includes a paginated view of the history of the workflow execution. The decider should use the workflow type and the history to determine how to properly handle the task. This action initiates a long poll, where the service holds the HTTP connection open and responds as soon a task becomes available. If no decision task is available in the specified task list before the timeout of 60 seconds expires, an empty result is returned. An empty result, in this context, means that a DecisionTask is returned, but that the value of taskToken is an empty string.  Deciders should set their client side socket timeout to at least 70 seconds (10 seconds higher than the timeout).   Because the number of workflow history events for a single workflow execution might be very large, the result returned might be split up across a number of pages. To retrieve subsequent pages, make additional calls to PollForDecisionTask using the nextPageToken returned by the initial call. Note that you do not call GetWorkflowExecutionHistory with this nextPageToken. Instead, call PollForDecisionTask again.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the taskList.name parameter by using a Condition element with the swf:taskList.name key to allow the action to access only certain task lists.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - domain: The name of the domain containing the task lists to poll.
    ///   - identity: Identity of the decider making the request, which is recorded in the DecisionTaskStarted event in the workflow history. This enables diagnostic tracing when problems arise. The form of this identity is user defined.
    ///   - maximumPageSize: The maximum number of results that are returned per call. Use nextPageToken to obtain further pages of results.  This is an upper limit only; the actual number of results returned per call may be fewer than the specified maximum.
    ///   - nextPageToken: If NextPageToken is returned there are more results available.  The value of NextPageToken is a unique pagination token for each page. Make the call again using  the returned token to retrieve the next page. Keep all other arguments unchanged. Each pagination token expires  after 24 hours. Using an expired pagination token will return a 400 error: "Specified token has  exceeded its maximum lifetime".  The configured maximumPageSize determines how many results can be returned in a single call.   The nextPageToken returned by this action cannot be used with GetWorkflowExecutionHistory to get the next page. You must call PollForDecisionTask again (with the nextPageToken) to retrieve the next page of history records. Calling PollForDecisionTask with a nextPageToken doesn't return a new decision task.
    ///   - reverseOrder: When set to true, returns the events in reverse order. By default the results are returned in ascending order of the eventTimestamp of the events.
    ///   - startAtPreviousStartedEvent: When set to true, returns the events with eventTimestamp greater than or equal to eventTimestamp of the most recent DecisionTaskStarted event. By default, this parameter is set to false.
    ///   - taskList: Specifies the task list to poll for decision tasks. The specified string must not contain a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f-\u009f). Also, it must not be the literal string arn.
    ///   - logger: Logger use during operation
    @inlinable
    public func pollForDecisionTask(
        domain: String,
        identity: String? = nil,
        maximumPageSize: Int? = nil,
        nextPageToken: String? = nil,
        reverseOrder: Bool? = nil,
        startAtPreviousStartedEvent: Bool? = nil,
        taskList: TaskList,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> DecisionTask {
        let input = PollForDecisionTaskInput(
            domain: domain, 
            identity: identity, 
            maximumPageSize: maximumPageSize, 
            nextPageToken: nextPageToken, 
            reverseOrder: reverseOrder, 
            startAtPreviousStartedEvent: startAtPreviousStartedEvent, 
            taskList: taskList
        )
        return try await self.pollForDecisionTask(input, logger: logger)
    }

    /// Used by activity workers to report to the service that the ActivityTask represented by the specified taskToken is still making progress. The worker can also specify details of the progress, for example percent complete, using the details parameter. This action can also be used by the worker as a mechanism to check if cancellation is being requested for the activity task. If a cancellation is being attempted for the specified task, then the boolean cancelRequested flag returned by the service is set to true. This action resets the taskHeartbeatTimeout clock. The taskHeartbeatTimeout is specified in RegisterActivityType. This action doesn't in itself create an event in the workflow execution history. However, if the task times out, the workflow execution history contains a ActivityTaskTimedOut event that contains the information from the last heartbeat generated by the activity worker.  The taskStartToCloseTimeout of an activity type is the maximum duration of an activity task, regardless of the number of RecordActivityTaskHeartbeat requests received. The taskStartToCloseTimeout is also specified in RegisterActivityType.   This operation is only useful for long-lived activities to report liveliness of the task and to determine if a cancellation is being attempted.   If the cancelRequested flag returns true, a cancellation is being attempted. If the worker can cancel the activity, it should respond with RespondActivityTaskCanceled. Otherwise, it should ignore the cancellation request.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func recordActivityTaskHeartbeat(_ input: RecordActivityTaskHeartbeatInput, logger: Logger = AWSClient.loggingDisabled) async throws -> ActivityTaskStatus {
        try await self.client.execute(
            operation: "RecordActivityTaskHeartbeat", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Used by activity workers to report to the service that the ActivityTask represented by the specified taskToken is still making progress. The worker can also specify details of the progress, for example percent complete, using the details parameter. This action can also be used by the worker as a mechanism to check if cancellation is being requested for the activity task. If a cancellation is being attempted for the specified task, then the boolean cancelRequested flag returned by the service is set to true. This action resets the taskHeartbeatTimeout clock. The taskHeartbeatTimeout is specified in RegisterActivityType. This action doesn't in itself create an event in the workflow execution history. However, if the task times out, the workflow execution history contains a ActivityTaskTimedOut event that contains the information from the last heartbeat generated by the activity worker.  The taskStartToCloseTimeout of an activity type is the maximum duration of an activity task, regardless of the number of RecordActivityTaskHeartbeat requests received. The taskStartToCloseTimeout is also specified in RegisterActivityType.   This operation is only useful for long-lived activities to report liveliness of the task and to determine if a cancellation is being attempted.   If the cancelRequested flag returns true, a cancellation is being attempted. If the worker can cancel the activity, it should respond with RespondActivityTaskCanceled. Otherwise, it should ignore the cancellation request.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - details: If specified, contains details about the progress of the task.
    ///   - taskToken: The taskToken of the ActivityTask.   taskToken is generated by the service and should be treated as an opaque value. If the task is passed to another process, its taskToken must also be passed. This enables it to provide its progress and respond with results.
    ///   - logger: Logger use during operation
    @inlinable
    public func recordActivityTaskHeartbeat(
        details: String? = nil,
        taskToken: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> ActivityTaskStatus {
        let input = RecordActivityTaskHeartbeatInput(
            details: details, 
            taskToken: taskToken
        )
        return try await self.recordActivityTaskHeartbeat(input, logger: logger)
    }

    /// Registers a new activity type along with its configuration settings in the specified domain.  A TypeAlreadyExists fault is returned if the type already exists in the domain. You cannot change any configuration settings of the type after its registration, and it must be registered as a new version.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    defaultTaskList.name: String constraint. The key is swf:defaultTaskList.name.    name: String constraint. The key is swf:name.    version: String constraint. The key is swf:version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func registerActivityType(_ input: RegisterActivityTypeInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "RegisterActivityType", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Registers a new activity type along with its configuration settings in the specified domain.  A TypeAlreadyExists fault is returned if the type already exists in the domain. You cannot change any configuration settings of the type after its registration, and it must be registered as a new version.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    defaultTaskList.name: String constraint. The key is swf:defaultTaskList.name.    name: String constraint. The key is swf:name.    version: String constraint. The key is swf:version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - defaultTaskHeartbeatTimeout: If set, specifies the default maximum time before which a worker processing a task of this type must report progress by calling RecordActivityTaskHeartbeat. If the timeout is exceeded, the activity task is automatically timed out. This default can be overridden when scheduling an activity task using the ScheduleActivityTask Decision. If the activity worker subsequently attempts to record a heartbeat or returns a result, the activity worker receives an UnknownResource fault. In this case, Amazon SWF no longer considers the activity task to be valid; the activity worker should clean up the activity task. The duration is specified in seconds, an integer greater than or equal to 0. You can use NONE to specify unlimited duration.
    ///   - defaultTaskList: If set, specifies the default task list to use for scheduling tasks of this activity type. This default task list is used if a task list isn't provided when a task is scheduled through the ScheduleActivityTask Decision.
    ///   - defaultTaskPriority: The default task priority to assign to the activity type. If not assigned, then 0 is used. Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority. For more information about setting task priority, see Setting Task Priority in the in the Amazon SWF Developer Guide..
    ///   - defaultTaskScheduleToCloseTimeout: If set, specifies the default maximum duration for a task of this activity type. This default can be overridden when scheduling an activity task using the ScheduleActivityTask Decision. The duration is specified in seconds, an integer greater than or equal to 0. You can use NONE to specify unlimited duration.
    ///   - defaultTaskScheduleToStartTimeout: If set, specifies the default maximum duration that a task of this activity type can wait before being assigned to a worker. This default can be overridden when scheduling an activity task using the ScheduleActivityTask Decision. The duration is specified in seconds, an integer greater than or equal to 0. You can use NONE to specify unlimited duration.
    ///   - defaultTaskStartToCloseTimeout: If set, specifies the default maximum duration that a worker can take to process tasks of this activity type. This default can be overridden when scheduling an activity task using the ScheduleActivityTask Decision. The duration is specified in seconds, an integer greater than or equal to 0. You can use NONE to specify unlimited duration.
    ///   - description: A textual description of the activity type.
    ///   - domain: The name of the domain in which this activity is to be registered.
    ///   - name: The name of the activity type within the domain. The specified string must not contain a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f-\u009f). Also, it must not be the literal string arn.
    ///   - version: The version of the activity type.  The activity type consists of the name and version, the combination of which must be unique within the domain.  The specified string must not contain a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f-\u009f). Also, it must not be the literal string arn.
    ///   - logger: Logger use during operation
    @inlinable
    public func registerActivityType(
        defaultTaskHeartbeatTimeout: String? = nil,
        defaultTaskList: TaskList? = nil,
        defaultTaskPriority: String? = nil,
        defaultTaskScheduleToCloseTimeout: String? = nil,
        defaultTaskScheduleToStartTimeout: String? = nil,
        defaultTaskStartToCloseTimeout: String? = nil,
        description: String? = nil,
        domain: String,
        name: String,
        version: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = RegisterActivityTypeInput(
            defaultTaskHeartbeatTimeout: defaultTaskHeartbeatTimeout, 
            defaultTaskList: defaultTaskList, 
            defaultTaskPriority: defaultTaskPriority, 
            defaultTaskScheduleToCloseTimeout: defaultTaskScheduleToCloseTimeout, 
            defaultTaskScheduleToStartTimeout: defaultTaskScheduleToStartTimeout, 
            defaultTaskStartToCloseTimeout: defaultTaskStartToCloseTimeout, 
            description: description, 
            domain: domain, 
            name: name, 
            version: version
        )
        return try await self.registerActivityType(input, logger: logger)
    }

    /// Registers a new domain.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   You cannot use an IAM policy to control domain access for this action. The name of the domain being registered is available as the resource of this action.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func registerDomain(_ input: RegisterDomainInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "RegisterDomain", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Registers a new domain.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   You cannot use an IAM policy to control domain access for this action. The name of the domain being registered is available as the resource of this action.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - description: A text description of the domain.
    ///   - name: Name of the domain to register. The name must be unique in the region that the domain is registered in. The specified string must not start or end with whitespace. It must not contain a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f-\u009f). Also, it must not be the literal string arn.
    ///   - tags: Tags to be added when registering a domain. Tags may only contain unicode letters, digits, whitespace, or these symbols: _ . : / = + - @.
    ///   - workflowExecutionRetentionPeriodInDays: The duration (in days) that records and histories of workflow executions on the domain should be kept by the service. After the retention period, the workflow execution isn't available in the results of visibility calls. If you pass the value NONE or 0 (zero), then the workflow execution history isn't retained. As soon as the workflow execution completes, the execution record and its history are deleted. The maximum workflow execution retention period is 90 days. For more information about Amazon SWF service limits, see: Amazon SWF Service Limits in the Amazon SWF Developer Guide.
    ///   - logger: Logger use during operation
    @inlinable
    public func registerDomain(
        description: String? = nil,
        name: String,
        tags: [ResourceTag]? = nil,
        workflowExecutionRetentionPeriodInDays: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = RegisterDomainInput(
            description: description, 
            name: name, 
            tags: tags, 
            workflowExecutionRetentionPeriodInDays: workflowExecutionRetentionPeriodInDays
        )
        return try await self.registerDomain(input, logger: logger)
    }

    /// Registers a new workflow type and its configuration settings in the specified domain. The retention period for the workflow history is set by the RegisterDomain action.  If the type already exists, then a TypeAlreadyExists fault is returned. You cannot change the configuration settings of a workflow type once it is registered and it must be registered as a new version.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    defaultTaskList.name: String constraint. The key is swf:defaultTaskList.name.    name: String constraint. The key is swf:name.    version: String constraint. The key is swf:version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func registerWorkflowType(_ input: RegisterWorkflowTypeInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "RegisterWorkflowType", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Registers a new workflow type and its configuration settings in the specified domain. The retention period for the workflow history is set by the RegisterDomain action.  If the type already exists, then a TypeAlreadyExists fault is returned. You cannot change the configuration settings of a workflow type once it is registered and it must be registered as a new version.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    defaultTaskList.name: String constraint. The key is swf:defaultTaskList.name.    name: String constraint. The key is swf:name.    version: String constraint. The key is swf:version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - defaultChildPolicy: If set, specifies the default policy to use for the child workflow executions when a workflow execution of this type is terminated, by calling the TerminateWorkflowExecution action explicitly or due to an expired timeout. This default can be overridden when starting a workflow execution using the StartWorkflowExecution action or the StartChildWorkflowExecution Decision. The supported child policies are:    TERMINATE – The child executions are terminated.    REQUEST_CANCEL – A request to cancel is attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.    ABANDON – No action is taken. The child executions continue to run.
    ///   - defaultExecutionStartToCloseTimeout: If set, specifies the default maximum duration for executions of this workflow type. You can override this default when starting an execution through the StartWorkflowExecution Action or StartChildWorkflowExecution Decision. The duration is specified in seconds; an integer greater than or equal to 0. Unlike some of the other timeout parameters in Amazon SWF, you cannot specify a value of "NONE" for defaultExecutionStartToCloseTimeout; there is a one-year max limit on the time that a workflow execution can run. Exceeding this limit always causes the workflow execution to time out.
    ///   - defaultLambdaRole: The default IAM role attached to this workflow type.  Executions of this workflow type need IAM roles to invoke Lambda functions. If you don't specify an IAM role when you start this workflow type, the default Lambda role is attached to the execution. For more information, see https://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html in the Amazon SWF Developer Guide.
    ///   - defaultTaskList: If set, specifies the default task list to use for scheduling decision tasks for executions of this workflow type. This default is used only if a task list isn't provided when starting the execution through the StartWorkflowExecution Action or StartChildWorkflowExecution Decision.
    ///   - defaultTaskPriority: The default task priority to assign to the workflow type. If not assigned, then 0 is used. Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority. For more information about setting task priority, see Setting Task Priority in the Amazon SWF Developer Guide.
    ///   - defaultTaskStartToCloseTimeout: If set, specifies the default maximum duration of decision tasks for this workflow type. This default can be overridden when starting a workflow execution using the StartWorkflowExecution action or the StartChildWorkflowExecution Decision. The duration is specified in seconds, an integer greater than or equal to 0. You can use NONE to specify unlimited duration.
    ///   - description: Textual description of the workflow type.
    ///   - domain: The name of the domain in which to register the workflow type.
    ///   - name: The name of the workflow type. The specified string must not contain a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f-\u009f). Also, it must not be the literal string arn.
    ///   - version: The version of the workflow type.  The workflow type consists of the name and version, the combination of which must be unique within the domain. To get a list of all currently registered workflow types, use the ListWorkflowTypes action.  The specified string must not contain a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f-\u009f). Also, it must not be the literal string arn.
    ///   - logger: Logger use during operation
    @inlinable
    public func registerWorkflowType(
        defaultChildPolicy: ChildPolicy? = nil,
        defaultExecutionStartToCloseTimeout: String? = nil,
        defaultLambdaRole: String? = nil,
        defaultTaskList: TaskList? = nil,
        defaultTaskPriority: String? = nil,
        defaultTaskStartToCloseTimeout: String? = nil,
        description: String? = nil,
        domain: String,
        name: String,
        version: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = RegisterWorkflowTypeInput(
            defaultChildPolicy: defaultChildPolicy, 
            defaultExecutionStartToCloseTimeout: defaultExecutionStartToCloseTimeout, 
            defaultLambdaRole: defaultLambdaRole, 
            defaultTaskList: defaultTaskList, 
            defaultTaskPriority: defaultTaskPriority, 
            defaultTaskStartToCloseTimeout: defaultTaskStartToCloseTimeout, 
            description: description, 
            domain: domain, 
            name: name, 
            version: version
        )
        return try await self.registerWorkflowType(input, logger: logger)
    }

    /// Records a WorkflowExecutionCancelRequested event in the currently running workflow execution identified by the given domain, workflowId, and runId. This logically requests the cancellation of the workflow execution as a whole. It is up to the decider to take appropriate actions when it receives an execution history with this event.  If the runId isn't specified, the WorkflowExecutionCancelRequested event is recorded in the history of the current open workflow execution with the specified workflowId in the domain.   Because this action allows the workflow to properly clean up and gracefully close, it should be used instead of TerminateWorkflowExecution when possible.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func requestCancelWorkflowExecution(_ input: RequestCancelWorkflowExecutionInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "RequestCancelWorkflowExecution", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Records a WorkflowExecutionCancelRequested event in the currently running workflow execution identified by the given domain, workflowId, and runId. This logically requests the cancellation of the workflow execution as a whole. It is up to the decider to take appropriate actions when it receives an execution history with this event.  If the runId isn't specified, the WorkflowExecutionCancelRequested event is recorded in the history of the current open workflow execution with the specified workflowId in the domain.   Because this action allows the workflow to properly clean up and gracefully close, it should be used instead of TerminateWorkflowExecution when possible.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - domain: The name of the domain containing the workflow execution to cancel.
    ///   - runId: The runId of the workflow execution to cancel.
    ///   - workflowId: The workflowId of the workflow execution to cancel.
    ///   - logger: Logger use during operation
    @inlinable
    public func requestCancelWorkflowExecution(
        domain: String,
        runId: String? = nil,
        workflowId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = RequestCancelWorkflowExecutionInput(
            domain: domain, 
            runId: runId, 
            workflowId: workflowId
        )
        return try await self.requestCancelWorkflowExecution(input, logger: logger)
    }

    /// Used by workers to tell the service that the ActivityTask identified by the taskToken was successfully canceled. Additional details can be provided using the details argument. These details (if provided) appear in the ActivityTaskCanceled event added to the workflow history.  Only use this operation if the canceled flag of a RecordActivityTaskHeartbeat request returns true and if the activity can be safely undone or abandoned.  A task is considered open from the time that it is scheduled until it is closed. Therefore a task is reported as open while a worker is processing it. A task is closed after it has been specified in a call to RespondActivityTaskCompleted, RespondActivityTaskCanceled, RespondActivityTaskFailed, or the task has timed out.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func respondActivityTaskCanceled(_ input: RespondActivityTaskCanceledInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "RespondActivityTaskCanceled", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Used by workers to tell the service that the ActivityTask identified by the taskToken was successfully canceled. Additional details can be provided using the details argument. These details (if provided) appear in the ActivityTaskCanceled event added to the workflow history.  Only use this operation if the canceled flag of a RecordActivityTaskHeartbeat request returns true and if the activity can be safely undone or abandoned.  A task is considered open from the time that it is scheduled until it is closed. Therefore a task is reported as open while a worker is processing it. A task is closed after it has been specified in a call to RespondActivityTaskCompleted, RespondActivityTaskCanceled, RespondActivityTaskFailed, or the task has timed out.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - details:  Information about the cancellation.
    ///   - taskToken: The taskToken of the ActivityTask.   taskToken is generated by the service and should be treated as an opaque value. If the task is passed to another process, its taskToken must also be passed. This enables it to provide its progress and respond with results.
    ///   - logger: Logger use during operation
    @inlinable
    public func respondActivityTaskCanceled(
        details: String? = nil,
        taskToken: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = RespondActivityTaskCanceledInput(
            details: details, 
            taskToken: taskToken
        )
        return try await self.respondActivityTaskCanceled(input, logger: logger)
    }

    /// Used by workers to tell the service that the ActivityTask identified by the taskToken completed successfully with a result (if provided). The result appears in the ActivityTaskCompleted event in the workflow history.  If the requested task doesn't complete successfully, use RespondActivityTaskFailed instead. If the worker finds that the task is canceled through the canceled flag returned by RecordActivityTaskHeartbeat, it should cancel the task, clean up and then call RespondActivityTaskCanceled.  A task is considered open from the time that it is scheduled until it is closed. Therefore a task is reported as open while a worker is processing it. A task is closed after it has been specified in a call to RespondActivityTaskCompleted, RespondActivityTaskCanceled, RespondActivityTaskFailed, or the task has timed out.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func respondActivityTaskCompleted(_ input: RespondActivityTaskCompletedInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "RespondActivityTaskCompleted", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Used by workers to tell the service that the ActivityTask identified by the taskToken completed successfully with a result (if provided). The result appears in the ActivityTaskCompleted event in the workflow history.  If the requested task doesn't complete successfully, use RespondActivityTaskFailed instead. If the worker finds that the task is canceled through the canceled flag returned by RecordActivityTaskHeartbeat, it should cancel the task, clean up and then call RespondActivityTaskCanceled.  A task is considered open from the time that it is scheduled until it is closed. Therefore a task is reported as open while a worker is processing it. A task is closed after it has been specified in a call to RespondActivityTaskCompleted, RespondActivityTaskCanceled, RespondActivityTaskFailed, or the task has timed out.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - result: The result of the activity task. It is a free form string that is implementation specific.
    ///   - taskToken: The taskToken of the ActivityTask.   taskToken is generated by the service and should be treated as an opaque value. If the task is passed to another process, its taskToken must also be passed. This enables it to provide its progress and respond with results.
    ///   - logger: Logger use during operation
    @inlinable
    public func respondActivityTaskCompleted(
        result: String? = nil,
        taskToken: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = RespondActivityTaskCompletedInput(
            result: result, 
            taskToken: taskToken
        )
        return try await self.respondActivityTaskCompleted(input, logger: logger)
    }

    /// Used by workers to tell the service that the ActivityTask identified by the taskToken has failed with reason (if specified). The reason and details appear in the ActivityTaskFailed event added to the workflow history. A task is considered open from the time that it is scheduled until it is closed. Therefore a task is reported as open while a worker is processing it. A task is closed after it has been specified in a call to RespondActivityTaskCompleted, RespondActivityTaskCanceled, RespondActivityTaskFailed, or the task has timed out.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func respondActivityTaskFailed(_ input: RespondActivityTaskFailedInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "RespondActivityTaskFailed", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Used by workers to tell the service that the ActivityTask identified by the taskToken has failed with reason (if specified). The reason and details appear in the ActivityTaskFailed event added to the workflow history. A task is considered open from the time that it is scheduled until it is closed. Therefore a task is reported as open while a worker is processing it. A task is closed after it has been specified in a call to RespondActivityTaskCompleted, RespondActivityTaskCanceled, RespondActivityTaskFailed, or the task has timed out.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - details:  Detailed information about the failure.
    ///   - reason: Description of the error that may assist in diagnostics.
    ///   - taskToken: The taskToken of the ActivityTask.   taskToken is generated by the service and should be treated as an opaque value. If the task is passed to another process, its taskToken must also be passed. This enables it to provide its progress and respond with results.
    ///   - logger: Logger use during operation
    @inlinable
    public func respondActivityTaskFailed(
        details: String? = nil,
        reason: String? = nil,
        taskToken: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = RespondActivityTaskFailedInput(
            details: details, 
            reason: reason, 
            taskToken: taskToken
        )
        return try await self.respondActivityTaskFailed(input, logger: logger)
    }

    /// Used by deciders to tell the service that the DecisionTask identified by the taskToken has successfully completed. The decisions argument specifies the list of decisions made while processing the task. A DecisionTaskCompleted event is added to the workflow history. The executionContext specified is attached to the event in the workflow execution history.  Access Control  If an IAM policy grants permission to use RespondDecisionTaskCompleted, it can express permissions for the list of decisions in the decisions parameter. Each of the decisions has one or more parameters, much like a regular API call. To allow for policies to be as readable as possible, you can express permissions on decisions as if they were actual API calls, including applying conditions to some parameters. For more information, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func respondDecisionTaskCompleted(_ input: RespondDecisionTaskCompletedInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "RespondDecisionTaskCompleted", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Used by deciders to tell the service that the DecisionTask identified by the taskToken has successfully completed. The decisions argument specifies the list of decisions made while processing the task. A DecisionTaskCompleted event is added to the workflow history. The executionContext specified is attached to the event in the workflow execution history.  Access Control  If an IAM policy grants permission to use RespondDecisionTaskCompleted, it can express permissions for the list of decisions in the decisions parameter. Each of the decisions has one or more parameters, much like a regular API call. To allow for policies to be as readable as possible, you can express permissions on decisions as if they were actual API calls, including applying conditions to some parameters. For more information, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - decisions: The list of decisions (possibly empty) made by the decider while processing this decision task. See the docs for the Decision structure for details.
    ///   - executionContext: User defined context to add to workflow execution.
    ///   - taskList: The task list to use for the future decision tasks of this workflow execution. This list overrides the original task list you specified while starting the workflow execution.
    ///   - taskListScheduleToStartTimeout: Specifies a timeout (in seconds) for the task list override. When this parameter is missing, the task list override is permanent. This parameter makes it possible to temporarily override the task list. If a decision task scheduled on the override task list is not started within the timeout, the decision task will time out. Amazon SWF will revert the override and schedule a new decision task to the original task list. If a decision task scheduled on the override task list is started within the timeout, but not completed within the start-to-close timeout, Amazon SWF will also revert the override and schedule a new decision task to the original task list.
    ///   - taskToken: The taskToken from the DecisionTask.   taskToken is generated by the service and should be treated as an opaque value. If the task is passed to another process, its taskToken must also be passed. This enables it to provide its progress and respond with results.
    ///   - logger: Logger use during operation
    @inlinable
    public func respondDecisionTaskCompleted(
        decisions: [Decision]? = nil,
        executionContext: String? = nil,
        taskList: TaskList? = nil,
        taskListScheduleToStartTimeout: String? = nil,
        taskToken: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = RespondDecisionTaskCompletedInput(
            decisions: decisions, 
            executionContext: executionContext, 
            taskList: taskList, 
            taskListScheduleToStartTimeout: taskListScheduleToStartTimeout, 
            taskToken: taskToken
        )
        return try await self.respondDecisionTaskCompleted(input, logger: logger)
    }

    /// Records a WorkflowExecutionSignaled event in the workflow execution history and creates a decision task for the workflow execution identified by the given domain, workflowId and runId. The event is recorded with the specified user defined signalName and input (if provided).  If a runId isn't specified, then the WorkflowExecutionSignaled event is recorded in the history of the current open workflow with the matching workflowId in the domain.   If the specified workflow execution isn't open, this method fails with UnknownResource.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func signalWorkflowExecution(_ input: SignalWorkflowExecutionInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "SignalWorkflowExecution", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Records a WorkflowExecutionSignaled event in the workflow execution history and creates a decision task for the workflow execution identified by the given domain, workflowId and runId. The event is recorded with the specified user defined signalName and input (if provided).  If a runId isn't specified, then the WorkflowExecutionSignaled event is recorded in the history of the current open workflow with the matching workflowId in the domain.   If the specified workflow execution isn't open, this method fails with UnknownResource.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - domain: The name of the domain containing the workflow execution to signal.
    ///   - input: Data to attach to the WorkflowExecutionSignaled event in the target workflow execution's history.
    ///   - runId: The runId of the workflow execution to signal.
    ///   - signalName: The name of the signal. This name must be meaningful to the target workflow.
    ///   - workflowId: The workflowId of the workflow execution to signal.
    ///   - logger: Logger use during operation
    @inlinable
    public func signalWorkflowExecution(
        domain: String,
        input: String? = nil,
        runId: String? = nil,
        signalName: String,
        workflowId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = SignalWorkflowExecutionInput(
            domain: domain, 
            input: input, 
            runId: runId, 
            signalName: signalName, 
            workflowId: workflowId
        )
        return try await self.signalWorkflowExecution(input, logger: logger)
    }

    /// Starts an execution of the workflow type in the specified domain using the provided workflowId and input data. This action returns the newly started workflow execution.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    tagList.member.0: The key is swf:tagList.member.0.    tagList.member.1: The key is swf:tagList.member.1.    tagList.member.2: The key is swf:tagList.member.2.    tagList.member.3: The key is swf:tagList.member.3.    tagList.member.4: The key is swf:tagList.member.4.    taskList: String constraint. The key is swf:taskList.name.    workflowType.name: String constraint. The key is swf:workflowType.name.    workflowType.version: String constraint. The key is swf:workflowType.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func startWorkflowExecution(_ input: StartWorkflowExecutionInput, logger: Logger = AWSClient.loggingDisabled) async throws -> Run {
        try await self.client.execute(
            operation: "StartWorkflowExecution", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Starts an execution of the workflow type in the specified domain using the provided workflowId and input data. This action returns the newly started workflow execution.  Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    tagList.member.0: The key is swf:tagList.member.0.    tagList.member.1: The key is swf:tagList.member.1.    tagList.member.2: The key is swf:tagList.member.2.    tagList.member.3: The key is swf:tagList.member.3.    tagList.member.4: The key is swf:tagList.member.4.    taskList: String constraint. The key is swf:taskList.name.    workflowType.name: String constraint. The key is swf:workflowType.name.    workflowType.version: String constraint. The key is swf:workflowType.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - childPolicy: If set, specifies the policy to use for the child workflow executions of this workflow execution if it is terminated, by calling the TerminateWorkflowExecution action explicitly or due to an expired timeout. This policy overrides the default child policy specified when registering the workflow type using RegisterWorkflowType. The supported child policies are:    TERMINATE – The child executions are terminated.    REQUEST_CANCEL – A request to cancel is attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.    ABANDON – No action is taken. The child executions continue to run.    A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time then a fault is returned.
    ///   - domain: The name of the domain in which the workflow execution is created. The specified string must not contain a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f-\u009f). Also, it must not be the literal string arn.
    ///   - executionStartToCloseTimeout: The total duration for this workflow execution. This overrides the defaultExecutionStartToCloseTimeout specified when registering the workflow type. The duration is specified in seconds; an integer greater than or equal to 0. Exceeding this limit causes the workflow execution to time out. Unlike some of the other timeout parameters in Amazon SWF, you cannot specify a value of "NONE" for this timeout; there is a one-year max limit on the time that a workflow execution can run.  An execution start-to-close timeout must be specified either through this parameter or as a default when the workflow type is registered. If neither this parameter nor a default execution start-to-close timeout is specified, a fault is returned.
    ///   - input: The input for the workflow execution. This is a free form string which should be meaningful to the workflow you are starting. This input is made available to the new workflow execution in the WorkflowExecutionStarted history event.
    ///   - lambdaRole: The IAM role to attach to this workflow execution.  Executions of this workflow type need IAM roles to invoke Lambda functions. If you don't attach an IAM role, any attempt to schedule a Lambda task fails. This results in a ScheduleLambdaFunctionFailed history event. For more information, see https://docs.aws.amazon.com/amazonswf/latest/developerguide/lambda-task.html in the Amazon SWF Developer Guide.
    ///   - tagList: The list of tags to associate with the workflow execution. You can specify a maximum of 5 tags. You can list workflow executions with a specific tag by calling ListOpenWorkflowExecutions or ListClosedWorkflowExecutions and specifying a TagFilter.
    ///   - taskList: The task list to use for the decision tasks generated for this workflow execution. This overrides the defaultTaskList specified when registering the workflow type.  A task list for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task list was specified at registration time then a fault is returned.  The specified string must not contain a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f-\u009f). Also, it must not be the literal string arn.
    ///   - taskPriority: The task priority to use for this workflow execution. This overrides any default priority that was assigned when the workflow type was registered. If not set, then the default task priority for the workflow type is used. Valid values are integers that range from Java's Integer.MIN_VALUE (-2147483648) to Integer.MAX_VALUE (2147483647). Higher numbers indicate higher priority. For more information about setting task priority, see Setting Task Priority in the Amazon SWF Developer Guide.
    ///   - taskStartToCloseTimeout: Specifies the maximum duration of decision tasks for this workflow execution. This parameter overrides the defaultTaskStartToCloseTimout specified when registering the workflow type using RegisterWorkflowType. The duration is specified in seconds, an integer greater than or equal to 0. You can use NONE to specify unlimited duration.  A task start-to-close timeout for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default task start-to-close timeout was specified at registration time then a fault is returned.
    ///   - workflowId: The user defined identifier associated with the workflow execution. You can use this to associate a custom identifier with the workflow execution. You may specify the same identifier if a workflow execution is logically a restart of a previous execution. You cannot have two open workflow executions with the same workflowId at the same time within the same domain. The specified string must not contain a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f-\u009f). Also, it must not be the literal string arn.
    ///   - workflowType: The type of the workflow to start.
    ///   - logger: Logger use during operation
    @inlinable
    public func startWorkflowExecution(
        childPolicy: ChildPolicy? = nil,
        domain: String,
        executionStartToCloseTimeout: String? = nil,
        input: String? = nil,
        lambdaRole: String? = nil,
        tagList: [String]? = nil,
        taskList: TaskList? = nil,
        taskPriority: String? = nil,
        taskStartToCloseTimeout: String? = nil,
        workflowId: String,
        workflowType: WorkflowType,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws -> Run {
        let input = StartWorkflowExecutionInput(
            childPolicy: childPolicy, 
            domain: domain, 
            executionStartToCloseTimeout: executionStartToCloseTimeout, 
            input: input, 
            lambdaRole: lambdaRole, 
            tagList: tagList, 
            taskList: taskList, 
            taskPriority: taskPriority, 
            taskStartToCloseTimeout: taskStartToCloseTimeout, 
            workflowId: workflowId, 
            workflowType: workflowType
        )
        return try await self.startWorkflowExecution(input, logger: logger)
    }

    /// Add a tag to a Amazon SWF domain.  Amazon SWF supports a maximum of 50 tags per resource.
    @Sendable
    @inlinable
    public func tagResource(_ input: TagResourceInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "TagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Add a tag to a Amazon SWF domain.  Amazon SWF supports a maximum of 50 tags per resource.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) for the Amazon SWF domain.
    ///   - tags: The list of tags to add to a domain.  Tags may only contain unicode letters, digits, whitespace, or these symbols: _ . : / = + - @.
    ///   - logger: Logger use during operation
    @inlinable
    public func tagResource(
        resourceArn: String,
        tags: [ResourceTag],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = TagResourceInput(
            resourceArn: resourceArn, 
            tags: tags
        )
        return try await self.tagResource(input, logger: logger)
    }

    /// Records a WorkflowExecutionTerminated event and forces closure of the workflow execution identified by the given domain, runId, and workflowId. The child policy, registered with the workflow type or specified when starting this execution, is applied to any open child workflow executions of this workflow execution.  If the identified workflow execution was in progress, it is terminated immediately.   If a runId isn't specified, then the WorkflowExecutionTerminated event is recorded in the history of the current open workflow with the matching workflowId in the domain.   You should consider using RequestCancelWorkflowExecution action instead because it allows the workflow to gracefully close while TerminateWorkflowExecution doesn't.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func terminateWorkflowExecution(_ input: TerminateWorkflowExecutionInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "TerminateWorkflowExecution", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Records a WorkflowExecutionTerminated event and forces closure of the workflow execution identified by the given domain, runId, and workflowId. The child policy, registered with the workflow type or specified when starting this execution, is applied to any open child workflow executions of this workflow execution.  If the identified workflow execution was in progress, it is terminated immediately.   If a runId isn't specified, then the WorkflowExecutionTerminated event is recorded in the history of the current open workflow with the matching workflowId in the domain.   You should consider using RequestCancelWorkflowExecution action instead because it allows the workflow to gracefully close while TerminateWorkflowExecution doesn't.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - childPolicy: If set, specifies the policy to use for the child workflow executions of the workflow execution being terminated. This policy overrides the child policy specified for the workflow execution at registration time or when starting the execution. The supported child policies are:    TERMINATE – The child executions are terminated.    REQUEST_CANCEL – A request to cancel is attempted for each child execution by recording a WorkflowExecutionCancelRequested event in its history. It is up to the decider to take appropriate actions when it receives an execution history with this event.    ABANDON – No action is taken. The child executions continue to run.    A child policy for this workflow execution must be specified either as a default for the workflow type or through this parameter. If neither this parameter is set nor a default child policy was specified at registration time then a fault is returned.
    ///   - details:  Details for terminating the workflow execution.
    ///   - domain: The domain of the workflow execution to terminate.
    ///   - reason:  A descriptive reason for terminating the workflow execution.
    ///   - runId: The runId of the workflow execution to terminate.
    ///   - workflowId: The workflowId of the workflow execution to terminate.
    ///   - logger: Logger use during operation
    @inlinable
    public func terminateWorkflowExecution(
        childPolicy: ChildPolicy? = nil,
        details: String? = nil,
        domain: String,
        reason: String? = nil,
        runId: String? = nil,
        workflowId: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = TerminateWorkflowExecutionInput(
            childPolicy: childPolicy, 
            details: details, 
            domain: domain, 
            reason: reason, 
            runId: runId, 
            workflowId: workflowId
        )
        return try await self.terminateWorkflowExecution(input, logger: logger)
    }

    /// Undeprecates a previously deprecated activity type. After an activity type has been undeprecated, you can create new tasks of that activity type.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    activityType.name: String constraint. The key is swf:activityType.name.    activityType.version: String constraint. The key is swf:activityType.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func undeprecateActivityType(_ input: UndeprecateActivityTypeInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "UndeprecateActivityType", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Undeprecates a previously deprecated activity type. After an activity type has been undeprecated, you can create new tasks of that activity type.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    activityType.name: String constraint. The key is swf:activityType.name.    activityType.version: String constraint. The key is swf:activityType.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - activityType: The activity type to undeprecate.
    ///   - domain: The name of the domain of the deprecated activity type.
    ///   - logger: Logger use during operation
    @inlinable
    public func undeprecateActivityType(
        activityType: ActivityType,
        domain: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = UndeprecateActivityTypeInput(
            activityType: activityType, 
            domain: domain
        )
        return try await self.undeprecateActivityType(input, logger: logger)
    }

    /// Undeprecates a previously deprecated domain. After a domain has been undeprecated it can be used to create new workflow executions or register new types.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func undeprecateDomain(_ input: UndeprecateDomainInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "UndeprecateDomain", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Undeprecates a previously deprecated domain. After a domain has been undeprecated it can be used to create new workflow executions or register new types.  This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   You cannot use an IAM policy to constrain this action's parameters.   If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - name: The name of the domain of the deprecated workflow type.
    ///   - logger: Logger use during operation
    @inlinable
    public func undeprecateDomain(
        name: String,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = UndeprecateDomainInput(
            name: name
        )
        return try await self.undeprecateDomain(input, logger: logger)
    }

    /// Undeprecates a previously deprecated workflow type. After a workflow type has been undeprecated, you can create new executions of that type.   This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    workflowType.name: String constraint. The key is swf:workflowType.name.    workflowType.version: String constraint. The key is swf:workflowType.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    @Sendable
    @inlinable
    public func undeprecateWorkflowType(_ input: UndeprecateWorkflowTypeInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "UndeprecateWorkflowType", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Undeprecates a previously deprecated workflow type. After a workflow type has been undeprecated, you can create new executions of that type.   This operation is eventually consistent. The results are best effort and may not exactly reflect recent updates and changes.   Access Control  You can use IAM policies to control this action's access to Amazon SWF resources as follows:   Use a Resource element with the domain name to limit the action to only specified domains.   Use an Action element to allow or deny permission to call this action.   Constrain the following parameters by using a Condition element with the appropriate keys.    workflowType.name: String constraint. The key is swf:workflowType.name.    workflowType.version: String constraint. The key is swf:workflowType.version.     If the caller doesn't have sufficient permissions to invoke the action, or the parameter values fall outside the specified constraints, the action fails. The associated event attribute's cause parameter is set to OPERATION_NOT_PERMITTED. For details and example IAM policies, see Using IAM to Manage Access to Amazon SWF Workflows in the Amazon SWF Developer Guide.
    ///
    /// Parameters:
    ///   - domain: The name of the domain of the deprecated workflow type.
    ///   - workflowType: The name of the domain of the deprecated workflow type.
    ///   - logger: Logger use during operation
    @inlinable
    public func undeprecateWorkflowType(
        domain: String,
        workflowType: WorkflowType,
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = UndeprecateWorkflowTypeInput(
            domain: domain, 
            workflowType: workflowType
        )
        return try await self.undeprecateWorkflowType(input, logger: logger)
    }

    /// Remove a tag from a Amazon SWF domain.
    @Sendable
    @inlinable
    public func untagResource(_ input: UntagResourceInput, logger: Logger = AWSClient.loggingDisabled) async throws {
        try await self.client.execute(
            operation: "UntagResource", 
            path: "/", 
            httpMethod: .POST, 
            serviceConfig: self.config, 
            input: input, 
            logger: logger
        )
    }
    /// Remove a tag from a Amazon SWF domain.
    ///
    /// Parameters:
    ///   - resourceArn: The Amazon Resource Name (ARN) for the Amazon SWF domain.
    ///   - tagKeys: The list of tags to remove from the Amazon SWF domain.
    ///   - logger: Logger use during operation
    @inlinable
    public func untagResource(
        resourceArn: String,
        tagKeys: [String],
        logger: Logger = AWSClient.loggingDisabled        
    ) async throws {
        let input = UntagResourceInput(
            resourceArn: resourceArn, 
            tagKeys: tagKeys
        )
        return try await self.untagResource(input, logger: logger)
    }
}

extension SWF {
    /// Initializer required by `AWSService.with(middlewares:timeout:byteBufferAllocator:options)`. You are not able to use this initializer directly as there are not public
    /// initializers for `AWSServiceConfig.Patch`. Please use `AWSService.with(middlewares:timeout:byteBufferAllocator:options)` instead.
    public init(from: SWF, patch: AWSServiceConfig.Patch) {
        self.client = from.client
        self.config = from.config.with(patch: patch)
    }
}

// MARK: Paginators

@available(macOS 10.15, iOS 13.0, tvOS 13.0, watchOS 6.0, *)
extension SWF {
    /// Return PaginatorSequence for operation ``getWorkflowExecutionHistory(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func getWorkflowExecutionHistoryPaginator(
        _ input: GetWorkflowExecutionHistoryInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<GetWorkflowExecutionHistoryInput, History> {
        return .init(
            input: input,
            command: self.getWorkflowExecutionHistory,
            inputKey: \GetWorkflowExecutionHistoryInput.nextPageToken,
            outputKey: \History.nextPageToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``getWorkflowExecutionHistory(_:logger:)``.
    ///
    /// - Parameters:
    ///   - domain: The name of the domain containing the workflow execution.
    ///   - execution: Specifies the workflow execution for which to return the history.
    ///   - maximumPageSize: The maximum number of results that are returned per call. Use nextPageToken to obtain further pages of results.
    ///   - reverseOrder: When set to true, returns the events in reverse order. By default the results are returned in ascending order of the eventTimeStamp of the events.
    ///   - logger: Logger used for logging
    @inlinable
    public func getWorkflowExecutionHistoryPaginator(
        domain: String,
        execution: WorkflowExecution,
        maximumPageSize: Int? = nil,
        reverseOrder: Bool? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<GetWorkflowExecutionHistoryInput, History> {
        let input = GetWorkflowExecutionHistoryInput(
            domain: domain, 
            execution: execution, 
            maximumPageSize: maximumPageSize, 
            reverseOrder: reverseOrder
        )
        return self.getWorkflowExecutionHistoryPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listActivityTypes(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listActivityTypesPaginator(
        _ input: ListActivityTypesInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListActivityTypesInput, ActivityTypeInfos> {
        return .init(
            input: input,
            command: self.listActivityTypes,
            inputKey: \ListActivityTypesInput.nextPageToken,
            outputKey: \ActivityTypeInfos.nextPageToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listActivityTypes(_:logger:)``.
    ///
    /// - Parameters:
    ///   - domain: The name of the domain in which the activity types have been registered.
    ///   - maximumPageSize: The maximum number of results that are returned per call. Use nextPageToken to obtain further pages of results.
    ///   - name: If specified, only lists the activity types that have this name.
    ///   - registrationStatus: Specifies the registration status of the activity types to list.
    ///   - reverseOrder: When set to true, returns the results in reverse order. By default, the results are returned in ascending alphabetical order by name of the activity types.
    ///   - logger: Logger used for logging
    @inlinable
    public func listActivityTypesPaginator(
        domain: String,
        maximumPageSize: Int? = nil,
        name: String? = nil,
        registrationStatus: RegistrationStatus,
        reverseOrder: Bool? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListActivityTypesInput, ActivityTypeInfos> {
        let input = ListActivityTypesInput(
            domain: domain, 
            maximumPageSize: maximumPageSize, 
            name: name, 
            registrationStatus: registrationStatus, 
            reverseOrder: reverseOrder
        )
        return self.listActivityTypesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listClosedWorkflowExecutions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listClosedWorkflowExecutionsPaginator(
        _ input: ListClosedWorkflowExecutionsInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListClosedWorkflowExecutionsInput, WorkflowExecutionInfos> {
        return .init(
            input: input,
            command: self.listClosedWorkflowExecutions,
            inputKey: \ListClosedWorkflowExecutionsInput.nextPageToken,
            outputKey: \WorkflowExecutionInfos.nextPageToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listClosedWorkflowExecutions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - closeStatusFilter: If specified, only workflow executions that match this close status are listed. For example, if TERMINATED is specified, then only TERMINATED workflow executions are listed.   closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - closeTimeFilter: If specified, the workflow executions are included in the returned results based on whether their close times are within the range specified by this filter. Also, if this parameter is specified, the returned results are ordered by their close times.   startTimeFilter and closeTimeFilter are mutually exclusive. You must specify one of these in a request but not both.
    ///   - domain: The name of the domain that contains the workflow executions to list.
    ///   - executionFilter: If specified, only workflow executions matching the workflow ID specified in the filter are returned.   closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - maximumPageSize: The maximum number of results that are returned per call. Use nextPageToken to obtain further pages of results.
    ///   - reverseOrder: When set to true, returns the results in reverse order. By default the results are returned in descending order of the start or the close time of the executions.
    ///   - startTimeFilter: If specified, the workflow executions are included in the returned results based on whether their start times are within the range specified by this filter. Also, if this parameter is specified, the returned results are ordered by their start times.   startTimeFilter and closeTimeFilter are mutually exclusive. You must specify one of these in a request but not both.
    ///   - tagFilter: If specified, only executions that have the matching tag are listed.   closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - typeFilter: If specified, only executions of the type specified in the filter are returned.   closeStatusFilter, executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - logger: Logger used for logging
    @inlinable
    public func listClosedWorkflowExecutionsPaginator(
        closeStatusFilter: CloseStatusFilter? = nil,
        closeTimeFilter: ExecutionTimeFilter? = nil,
        domain: String,
        executionFilter: WorkflowExecutionFilter? = nil,
        maximumPageSize: Int? = nil,
        reverseOrder: Bool? = nil,
        startTimeFilter: ExecutionTimeFilter? = nil,
        tagFilter: TagFilter? = nil,
        typeFilter: WorkflowTypeFilter? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListClosedWorkflowExecutionsInput, WorkflowExecutionInfos> {
        let input = ListClosedWorkflowExecutionsInput(
            closeStatusFilter: closeStatusFilter, 
            closeTimeFilter: closeTimeFilter, 
            domain: domain, 
            executionFilter: executionFilter, 
            maximumPageSize: maximumPageSize, 
            reverseOrder: reverseOrder, 
            startTimeFilter: startTimeFilter, 
            tagFilter: tagFilter, 
            typeFilter: typeFilter
        )
        return self.listClosedWorkflowExecutionsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listDomains(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listDomainsPaginator(
        _ input: ListDomainsInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListDomainsInput, DomainInfos> {
        return .init(
            input: input,
            command: self.listDomains,
            inputKey: \ListDomainsInput.nextPageToken,
            outputKey: \DomainInfos.nextPageToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listDomains(_:logger:)``.
    ///
    /// - Parameters:
    ///   - maximumPageSize: The maximum number of results that are returned per call. Use nextPageToken to obtain further pages of results.
    ///   - registrationStatus: Specifies the registration status of the domains to list.
    ///   - reverseOrder: When set to true, returns the results in reverse order. By default, the results are returned in ascending alphabetical order by name of the domains.
    ///   - logger: Logger used for logging
    @inlinable
    public func listDomainsPaginator(
        maximumPageSize: Int? = nil,
        registrationStatus: RegistrationStatus,
        reverseOrder: Bool? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListDomainsInput, DomainInfos> {
        let input = ListDomainsInput(
            maximumPageSize: maximumPageSize, 
            registrationStatus: registrationStatus, 
            reverseOrder: reverseOrder
        )
        return self.listDomainsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listOpenWorkflowExecutions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listOpenWorkflowExecutionsPaginator(
        _ input: ListOpenWorkflowExecutionsInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListOpenWorkflowExecutionsInput, WorkflowExecutionInfos> {
        return .init(
            input: input,
            command: self.listOpenWorkflowExecutions,
            inputKey: \ListOpenWorkflowExecutionsInput.nextPageToken,
            outputKey: \WorkflowExecutionInfos.nextPageToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listOpenWorkflowExecutions(_:logger:)``.
    ///
    /// - Parameters:
    ///   - domain: The name of the domain that contains the workflow executions to list.
    ///   - executionFilter: If specified, only workflow executions matching the workflow ID specified in the filter are returned.   executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - maximumPageSize: The maximum number of results that are returned per call. Use nextPageToken to obtain further pages of results.
    ///   - reverseOrder: When set to true, returns the results in reverse order. By default the results are returned in descending order of the start time of the executions.
    ///   - startTimeFilter: Workflow executions are included in the returned results based on whether their start times are within the range specified by this filter.
    ///   - tagFilter: If specified, only executions that have the matching tag are listed.   executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - typeFilter: If specified, only executions of the type specified in the filter are returned.   executionFilter, typeFilter and tagFilter are mutually exclusive. You can specify at most one of these in a request.
    ///   - logger: Logger used for logging
    @inlinable
    public func listOpenWorkflowExecutionsPaginator(
        domain: String,
        executionFilter: WorkflowExecutionFilter? = nil,
        maximumPageSize: Int? = nil,
        reverseOrder: Bool? = nil,
        startTimeFilter: ExecutionTimeFilter,
        tagFilter: TagFilter? = nil,
        typeFilter: WorkflowTypeFilter? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListOpenWorkflowExecutionsInput, WorkflowExecutionInfos> {
        let input = ListOpenWorkflowExecutionsInput(
            domain: domain, 
            executionFilter: executionFilter, 
            maximumPageSize: maximumPageSize, 
            reverseOrder: reverseOrder, 
            startTimeFilter: startTimeFilter, 
            tagFilter: tagFilter, 
            typeFilter: typeFilter
        )
        return self.listOpenWorkflowExecutionsPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``listWorkflowTypes(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func listWorkflowTypesPaginator(
        _ input: ListWorkflowTypesInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<ListWorkflowTypesInput, WorkflowTypeInfos> {
        return .init(
            input: input,
            command: self.listWorkflowTypes,
            inputKey: \ListWorkflowTypesInput.nextPageToken,
            outputKey: \WorkflowTypeInfos.nextPageToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``listWorkflowTypes(_:logger:)``.
    ///
    /// - Parameters:
    ///   - domain: The name of the domain in which the workflow types have been registered.
    ///   - maximumPageSize: The maximum number of results that are returned per call. Use nextPageToken to obtain further pages of results.
    ///   - name: If specified, lists the workflow type with this name.
    ///   - registrationStatus: Specifies the registration status of the workflow types to list.
    ///   - reverseOrder: When set to true, returns the results in reverse order. By default the results are returned in ascending alphabetical order of the name of the workflow types.
    ///   - logger: Logger used for logging
    @inlinable
    public func listWorkflowTypesPaginator(
        domain: String,
        maximumPageSize: Int? = nil,
        name: String? = nil,
        registrationStatus: RegistrationStatus,
        reverseOrder: Bool? = nil,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<ListWorkflowTypesInput, WorkflowTypeInfos> {
        let input = ListWorkflowTypesInput(
            domain: domain, 
            maximumPageSize: maximumPageSize, 
            name: name, 
            registrationStatus: registrationStatus, 
            reverseOrder: reverseOrder
        )
        return self.listWorkflowTypesPaginator(input, logger: logger)
    }

    /// Return PaginatorSequence for operation ``pollForDecisionTask(_:logger:)``.
    ///
    /// - Parameters:
    ///   - input: Input for operation
    ///   - logger: Logger used for logging
    @inlinable
    public func pollForDecisionTaskPaginator(
        _ input: PollForDecisionTaskInput,
        logger: Logger = AWSClient.loggingDisabled
    ) -> AWSClient.PaginatorSequence<PollForDecisionTaskInput, DecisionTask> {
        return .init(
            input: input,
            command: self.pollForDecisionTask,
            inputKey: \PollForDecisionTaskInput.nextPageToken,
            outputKey: \DecisionTask.nextPageToken,
            logger: logger
        )
    }
    /// Return PaginatorSequence for operation ``pollForDecisionTask(_:logger:)``.
    ///
    /// - Parameters:
    ///   - domain: The name of the domain containing the task lists to poll.
    ///   - identity: Identity of the decider making the request, which is recorded in the DecisionTaskStarted event in the workflow history. This enables diagnostic tracing when problems arise. The form of this identity is user defined.
    ///   - maximumPageSize: The maximum number of results that are returned per call. Use nextPageToken to obtain further pages of results.  This is an upper limit only; the actual number of results returned per call may be fewer than the specified maximum.
    ///   - reverseOrder: When set to true, returns the events in reverse order. By default the results are returned in ascending order of the eventTimestamp of the events.
    ///   - startAtPreviousStartedEvent: When set to true, returns the events with eventTimestamp greater than or equal to eventTimestamp of the most recent DecisionTaskStarted event. By default, this parameter is set to false.
    ///   - taskList: Specifies the task list to poll for decision tasks. The specified string must not contain a : (colon), / (slash), | (vertical bar), or any control characters (\u0000-\u001f | \u007f-\u009f). Also, it must not be the literal string arn.
    ///   - logger: Logger used for logging
    @inlinable
    public func pollForDecisionTaskPaginator(
        domain: String,
        identity: String? = nil,
        maximumPageSize: Int? = nil,
        reverseOrder: Bool? = nil,
        startAtPreviousStartedEvent: Bool? = nil,
        taskList: TaskList,
        logger: Logger = AWSClient.loggingDisabled        
    ) -> AWSClient.PaginatorSequence<PollForDecisionTaskInput, DecisionTask> {
        let input = PollForDecisionTaskInput(
            domain: domain, 
            identity: identity, 
            maximumPageSize: maximumPageSize, 
            reverseOrder: reverseOrder, 
            startAtPreviousStartedEvent: startAtPreviousStartedEvent, 
            taskList: taskList
        )
        return self.pollForDecisionTaskPaginator(input, logger: logger)
    }
}

extension SWF.GetWorkflowExecutionHistoryInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> SWF.GetWorkflowExecutionHistoryInput {
        return .init(
            domain: self.domain,
            execution: self.execution,
            maximumPageSize: self.maximumPageSize,
            nextPageToken: token,
            reverseOrder: self.reverseOrder
        )
    }
}

extension SWF.ListActivityTypesInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> SWF.ListActivityTypesInput {
        return .init(
            domain: self.domain,
            maximumPageSize: self.maximumPageSize,
            name: self.name,
            nextPageToken: token,
            registrationStatus: self.registrationStatus,
            reverseOrder: self.reverseOrder
        )
    }
}

extension SWF.ListClosedWorkflowExecutionsInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> SWF.ListClosedWorkflowExecutionsInput {
        return .init(
            closeStatusFilter: self.closeStatusFilter,
            closeTimeFilter: self.closeTimeFilter,
            domain: self.domain,
            executionFilter: self.executionFilter,
            maximumPageSize: self.maximumPageSize,
            nextPageToken: token,
            reverseOrder: self.reverseOrder,
            startTimeFilter: self.startTimeFilter,
            tagFilter: self.tagFilter,
            typeFilter: self.typeFilter
        )
    }
}

extension SWF.ListDomainsInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> SWF.ListDomainsInput {
        return .init(
            maximumPageSize: self.maximumPageSize,
            nextPageToken: token,
            registrationStatus: self.registrationStatus,
            reverseOrder: self.reverseOrder
        )
    }
}

extension SWF.ListOpenWorkflowExecutionsInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> SWF.ListOpenWorkflowExecutionsInput {
        return .init(
            domain: self.domain,
            executionFilter: self.executionFilter,
            maximumPageSize: self.maximumPageSize,
            nextPageToken: token,
            reverseOrder: self.reverseOrder,
            startTimeFilter: self.startTimeFilter,
            tagFilter: self.tagFilter,
            typeFilter: self.typeFilter
        )
    }
}

extension SWF.ListWorkflowTypesInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> SWF.ListWorkflowTypesInput {
        return .init(
            domain: self.domain,
            maximumPageSize: self.maximumPageSize,
            name: self.name,
            nextPageToken: token,
            registrationStatus: self.registrationStatus,
            reverseOrder: self.reverseOrder
        )
    }
}

extension SWF.PollForDecisionTaskInput: AWSPaginateToken {
    @inlinable
    public func usingPaginationToken(_ token: String) -> SWF.PollForDecisionTaskInput {
        return .init(
            domain: self.domain,
            identity: self.identity,
            maximumPageSize: self.maximumPageSize,
            nextPageToken: token,
            reverseOrder: self.reverseOrder,
            startAtPreviousStartedEvent: self.startAtPreviousStartedEvent,
            taskList: self.taskList
        )
    }
}
